package com.xiaoxx.service;

import com.alibaba.dashscope.exception.InputRequiredException;
import com.alibaba.dashscope.exception.NoApiKeyException;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xiaoxx.model.dto.chat.ChatDto;
import com.xiaoxx.model.entity.chat.ChatContent;
import com.xiaoxx.model.vo.chat.ChatContentListVo;
import com.xiaoxx.model.vo.chat.ChatTokenStatisticsAllVo;
import com.xiaoxx.model.vo.chat.ChatTokenStatisticsVo;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;

import java.io.IOException;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author HX
 * @since 2023-07-19
 */
public interface ChatContentService extends IService<ChatContent> {

    void start(ChatDto chatVo) throws NoApiKeyException, InputRequiredException, IOException;

    SseEmitter addSse(String id);

    List<ChatContentListVo> getList(String chatMenuId);

    List<ChatTokenStatisticsVo> tokenStatistics(Integer type);

    ChatTokenStatisticsAllVo tokenStatisticsAll();
}
